FROM python:3.7-alpine
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.cqu.edu.cn/g' /etc/apk/repositories
RUN pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple
WORKDIR /code
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
RUN apk add --no-cache gcc musl-dev linux-headers
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
EXPOSE 5000
COPY . .
CMD ["flask", "run"]

